package com.peach.SSMDemo.service;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.peach.SSMDemo.dao.FltDao;
import com.peach.SSMDemo.domain.FltRecord;
import com.peach.SSMDemo.domain.FltRequest;
import com.peach.SSMDemo.service.Impl.FltImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by tao on 2017/8/29.
 */

@Service

public class FltService implements FltImpl{


    public String getFltRecordService (FltRequest fltRequest) throws JsonProcessingException {

//        System.out.println(fltRequest.getStartDate()+ "---" + "---" +fltRequest.getEndtDate());

        FltDao fltDao = new FltDao();

        List<FltRecord> fltRecords = fltDao.getAllWithDate(fltRequest);

        String body =new JSONService().praseJSON(fltRecords);

        return (body);


   }



}
